#!/bin/bash
j="jdbc:oracle:thin:@192.168.1.56:1521/ORCL"
u="scott"
p="123456"
t="CUST_HZ"
dir="/user/hive/warehouse/dm02.db/customer_order_summary"
sqoop export \
--connect ${j} \
--username ${u} \
--password ${p} \
--table ${t} \
--export-dir ${dir} \
--fields-terminated-by ',' \
--lines-terminated-by '\n' \
--input-null-string '\\N' \
--input-null-non-string '\\N'
echo $?
